/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.rm.entidades.exp;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 * 
 * @author ffbeltran
 */
@Entity
@NamedQueries( {
		@NamedQuery(name = "ExpIdea.findAll", query = "SELECT e FROM ExpIdea e"),
		@NamedQuery(name = "ExpIdea.findById", query = "SELECT e FROM ExpIdea e WHERE e.id = :id"),
		@NamedQuery(name = "ExpIdea.findByJugador", query = "SELECT e FROM ExpIdea e WHERE e.jugador = :jugador"),
		@NamedQuery(name = "ExpIdea.findByPuntosIdea", query = "SELECT e FROM ExpIdea e WHERE e.puntosIdea = :puntosIdea"),
		@NamedQuery(name = "ExpIdea.findByIdPartida", query = "SELECT e FROM ExpIdea e WHERE e.partida = :partida"),
		@NamedQuery(name = "ExpIdea.findByCompartido", query = "SELECT e FROM ExpIdea e WHERE e.compartido = :compartido") })
public class ExpIdea extends ExperienciaBase {
	private static final long serialVersionUID = 1L;

	@Basic(optional = false)
	private int puntosIdea;

	public ExpIdea() {
	}

	public ExpIdea(Integer id) {
		super(id);
	}

	public int getPuntosIdea() {
		return puntosIdea;
	}

    public void setPuntosIdea(int puntosIdea) {
        this.puntosIdea = puntosIdea;
    }

    @Override
	public void actualizaExp() {
		setExp(puntosIdea);
	}

	@Override
	public String toString() {
		return "org.rm.entidades.ExpIdea[id=" + super.getId() + "]";
	}

}
